<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false" %>
<head>
    <meta charset="UTF-8">
    <title>信息修改</title>
    <style type="text/css">
        .Content-Main{
            max-width: 500px;
            margin: auto;
            border: none;
            border-radius: 5px;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
            text-shadow: 1px 1px 1px #444;
            color: #D3D3D3;
            background: #555;
        }
        .Content-Main h1{
            padding: 8px 0px 40px 10px;
            display: block;
            border-bottom: 1px solid #444;
        }
        .text1{
            margin-left: 3px;
        }
        .Content-Main label{
            margin: 0px 0px 5px;
            display: block;
        }
        .fileInputContainer{
            height: 99px;
            width: 99px;
            margin: 20px 20px 20px 20px ;
            border: none;
            overflow: hidden;
            position: relative;
        }
        .fileInput{
            height: 106px;
            border: none;
            font-size: 300px;
            opacity: 0;
            filter:alpha(opacity=0);
            cursor: pointer;
            position: absolute;
        }
        .Content-Main label>span{
            width: 20%;
            float: left;
            text-align: right;
            padding-right: 10px;
            margin-top: 10px;
            font-weight: bold;
        }
        .Main-sex{
            padding-right: 13px;
            padding-bottom: 13px;
            font-weight: bold;
            line-height: 4px;
        }
        .Main-sex input[type=checkbox]{
            margin-top:6px;
            vertical-align:middle;
        }
        .Content-Main input[type="text"],.Content-Main input[type="email"],.Content-Main input[type="password"]{
            height: 25px;
            width: 70%;
            line-height: 15px;
            padding: 5px 0px 5px 5px;
            margin-bottom: 16px;
            margin-right: 6px;
            margin-top: 2px;
            border: none;
            border-radius:2px;
            -webkit-border-radius:2px;
            -moz-border-radius:2px;
            outline: 0 none;
            background:  #DFDFDF;
            color: #525252;
        }
        .Content-Main textarea{
            height: 100px;
            width: 70%;
            padding: 5px 0px 0px 5px;
        }
        .Content-Main .button{
            padding: 8px 24px 8px 24px;
            margin-bottom: 8px;
            border: none;
            border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            font-weight: bold;
            text-shadow: 1px 1px 1px #FFE477;
            box-shadow: 1px 1px 1px  #3D3D3D;
            -moz-box-shadow: 1px 1px 1px  #3D3D3D;
            -webkit-box-shadow: 1px 1px 1px  #3D3D3D;
            color: #585858;
            background: #f6ff0a;
        }
        .Content-Main .button:hover{
            color:  #333;
            background-color:  #EBEBEB ;
        }
    </style>
<%
    Object stulist=request.getSession().getAttribute("stulist");
    Object sf=request.getSession().getAttribute("sf");
%>
</head>
<body>
<div class="Content-Main">
    <%if(sf=="student"){%>
    <c:forEach items="${stulist}" var="s">
    <form  action="/examproject/stu/updateinfo" method="post" class="form-userInfo" enctype="multipart/form-data">
        <h1>个人信息</h1>
        <span class="text1">请在文本框中修改您的个人信息：</span>
        <c:choose>
            <c:when test="${s.stavatar==null}">
            <input type="hidden" value="../images/mrtx.png" name="hidden">
             <div class="fileInputContainer" style="background-image: url('../images/mrtx.png');background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;};">
            </c:when>
            <c:otherwise>
                <input type="hidden" value="${s.stavatar}" name="hidden">
                <div class="fileInputContainer" style="background-image: url('${s.stavatar}');background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;};">
            </c:otherwise>
        </c:choose>
        <input class="fileInput" id="" type="file" name="wj">
        </div>
        <label>
            <span>电话:</span>
            <c:choose>
            <c:when test="${s.stphone==null}">
            <input type="text" value=""  name="tel" placeholder="请输入电话">
            </c:when>
                <c:otherwise>
                    <input type="text" value="${s.stphone}"  name="tel" placeholder="请输入电话">
                </c:otherwise>
            </c:choose>
        </label>
        <label class="Main-sex">
            <span>性别:</span>
            <c:choose>
            <c:when test="${s.stsex==null}">
                <input type="radio" class="man" value="男" name="sex">男
                <input type="radio" class="women" value="女" name="sex">女
            </c:when>
            <c:when test="${s.stsex=='男'}">
                <input type="radio" class="man" value="男" name="sex" checked="checked">男
                <input type="radio" class="women" value="女" name="sex">女
            </c:when>
            <c:when test="${s.stsex=='女'}">
                <input type="radio" class="man" value="男" name="sex">男
                <input type="radio" class="women" value="女" name="sex" checked="checked">女
            </c:when>
            </c:choose>
        </label>
        <label>
            <span>微信:</span>
            <c:choose>
                <c:when test="${s.stwx==null}">
                    <input type="text" value=""  name="wx" placeholder="请输入微信">
                </c:when>
                <c:otherwise>
                    <input type="text" value="${s.stwx}"  name="wx" placeholder="请输入微信">
                </c:otherwise>
            </c:choose>
        </label>
        <label>
            <span>密码:</span>
            <input type="password" name="pwd" value="${s.stpass}">
        </label>
        <label>
            <input type="submit" class="button" value="提交">
        </label>
    </form>
    </c:forEach>
    <%}else{%>
    <c:forEach items="${stulist}" var="s">
    <form  action="/examproject/stu/updateinfo" method="post" class="form-userInfo" enctype="multipart/form-data">
        <h1>个人信息</h1>
        <span class="text1">请在文本框中修改您的个人信息：</span>
        <c:choose>
        <c:when test="${s.thavatar==null}">
        <input type="hidden" value="../images/mrtx.png" name="hidden">
        <div class="fileInputContainer" style="background-image: url('../images/mrtx.png');background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;};">
            </c:when>
            <c:otherwise>
            <input type="hidden" value="${s.thavatar}" name="hidden">
            <div class="fileInputContainer" style="background-image: url('${s.thavatar}');background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;};">
                </c:otherwise>
                </c:choose>
                <input class="fileInput" id="" type="file" name="wj">
            </div>
            <label>
                <span>电话:</span>
                <c:choose>
                    <c:when test="${s.tphone==null}">
                        <input type="text" value=""  name="tel" placeholder="请输入电话">
                    </c:when>
                    <c:otherwise>
                        <input type="text" value="${s.tphone}"  name="tel" placeholder="请输入电话">
                    </c:otherwise>
                </c:choose>
            </label>
            <label>
                <span>密码:</span>
                <input type="password" name="pwd" value="${s.tpass}">
            </label>
            <label>
                <input type="submit" class="button" value="提交">
            </label>
    </form>
    </c:forEach>
    <%}%>
</div>
</body>